<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Stimulus360.Controllers.Users.ProjectListViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="centerContainer">
            <%Html.RenderPartial("StimulusLeftNavigation"); %>
        <div class="mainInner colViewHdr">
            <div class="projListItem p10">
                <h2> <span class="welText">Welcome</span> <%=Model.UserName%></h2>
            </div>
            <div id="feedbackListContainer">
                <%Html.RenderPartial("ProjectsList", Model.Projects); %>
            </div>
            <br clear="all" />
            <div class="pagerbg">
                <div id="pagerProjectList" class="pager">
                </div>
            </div>
</div>
</div>
<script type="text/javascript" language="javascript">
    $(document).ready(function() {
    tabUrl = "Projects"; //*** need to set this global variable to redirect the user to the project feedback page on click of the rating control...
    $("#myProjectsTag").addClass("selected");
        var totalPages_Idea = "<%=Model.Projects.TotalPages %>";
        if (totalPages_Idea == 1) {
            $(".pagerbg").hide();
        }
        var currentPage = "<%=Model.Projects.PageIndex%>";
        $("#pagerProjectList").pager({ pagenumber: currentPage, pagecount: totalPages_Idea, buttonClickCallback: PageClick_ProjList });
    });
    PageClick_ProjList = function(pageclickednuber) {
    var pageIndex = pageclickednuber;
                
                window.location= "/Users/"+"<%=Model.UserName %>"+"/Projects/Page/" + pageIndex.toString();

            } 


</script>

</asp:Content>

